﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL.Repository;
using BLL.RepositoryInterface;

namespace Infrastructure
{
    public static class RepositoryFactory
    {
        public static T GetRepository<T>(string connectionString)
        {
            T dal = default(T);
            if(typeof(T) ==  typeof(IOrderRepository))
            {
                IOrderRepository repository = (IOrderRepository)new OrderRepository(connectionString);
                dal = (T)repository;
            }
            return dal;
        }
    }
}
